TECHNICAL REPORT TR99-02 Type-Based Useless Variable Elimination
نویسنده
چکیده
We show a type-based method for useless variable elimination, i.e., transformation that eliminates variables whose values contribute nothing to the nal outcome of a computation, and prove its correctness. The algorithm is a surprisingly simple extension of the usual type reconstruction algorithm. Our method seems more attractive than Wand and Siveroni's 0CFA-based method in many respects. First, it is e cient: it runs in time almost linear in the size of an input expression for a simply-typed -calculus, while the 0CFA-based method may require a cubic time. Second, our transformation can be shown to be optimal among those that preserve well-typedness, both for the simply-typed language and for an ML-style polymorphically-typed language. On the other hand, the 0CFA-based method is not optimal for the polymophically-typed language. ANY OTHER IDENTIFYING INFORMATION OF THIS REPORT Summary has been submitted for publication. Up-to-date version of this report will be available through http://www.yl.is.s.u-tokyo.ac.jp/ koba/publications.html DISTRIBUTION STATEMENT This technical report is available ONLY via anonymous FTP from ftp.is.s.u-tokyo.ac.jp (directory /pub/tech-reports). SUPPLEMENTARY NOTES REPORT DATE
منابع مشابه
Useless-Variable Elimination
1 Intro In my 1988 SIGPLAN paper “Control-Flow Analysis in Scheme,” I promised to cover several items in more detail in a “forthcoming tech report.” The tech report has yet to happen. Most of the promised items have been covered in other papers (“The Semantics of Scheme Control-Flow Analysis” and “Data-Flow Analysis and Type Recovery in Scheme”). Useless-variable elimination, however, is still ...
متن کاملThe Motivation for Dynamic Adaptive Autonomy in Agent-based Systems
Agent-based systems require flexibility to perform effectively in complex and dynamic environments. Previous research has identified numerous motivations for adaptability in agent-based systems; however, the extent of this adaptability can be expanded. This paper shows that agents should be able to benefit from controlling the problem-solving frameworks (also called planning-interaction framewo...
متن کاملAutomatic useless-code elimination for HOT functional programs
In this paper we present two type inference systems for detecting useless-code in higher-order typed functional programs. Type inference can be performed in an efficient and complete way, by reducing it to the solution of a system of constraints. We also give a useless-code elimination algorithm which is based on a combined use of these type inference systems. The main application of the techni...
متن کاملUseless-Code Elimination and Program Slicing for the Pi-Calculus
In this paper, we study program transformations called uselesscode elimination and program slicing in the context of the π-calculus. The aim of useless-code elimination and program slicing is to simplify a program by eliminating useless or unimportant part of the program. We define formal correctness criteria for those transformations, present a type-based transformation method, and prove its c...
متن کاملUseless Code Elimination and Programm Slicing for the Pi-Calculus
In this paper, we study program transformations called uselesscode elimination and program slicing in the context of the π-calculus. The aim of useless-code elimination and program slicing is to simplify a program by eliminating useless or unimportant part of the program. We define formal correctness criteria for those transformations, present a type-based transformation method, and prove its c...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 1999